<?php
$sErrors = ErrorHandler::getErrors();
if (count($sErrors) > 0) {
	?>
	<div id="layer_error" class="hidden" style="visibility: visible;">
	<form name="form_error">
	<table class="boxborder" cellspacing="0">
		<tr>
		<td class="boxhandle"><?= msg('Errors') ?></td>
		</tr>
	<?php
	for ($i = 0; $i < count($sErrors); $i++)
	{
		?>
		<tr>
			<td class="listentity"><span class="error"><?php print nl2br(wordwrap($sErrors[$i], 40)) ?></span></td>
		</tr>
		<?php
	}
	?>
		<tr>
			<td class="boxbody" style="text-align: center;">
				<input type="button" value="<?= msg('OK') ?>" name="bOK" onClick="layerHide('layer_error');">
			</td>
		</tr>
	</table>
	</form>
	</div>
	<script language="JavaScript">
		document.form_error.bOK.focus();
	</script>
	<?php
}
?>
